﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace org.webguvenligi.NSecureImageLib.GraphicFileFormats.PNG.Exceptions
{
    public class PNGBaseException : Exception
    {
        public PNGBaseException()
            : base()
        {
        }
        public PNGBaseException(string message, Exception innerException)
            : base(message, innerException)
        {

        }
        public PNGBaseException(string message) :
            base(message)
        {
        }
    }
    public class PngInvalidDataException : PNGBaseException
    {
        public PngInvalidDataException()
            : base()
        {
        }
        public PngInvalidDataException(string message, Exception innerException)
            : base(message, innerException)
        {

        }
        public PngInvalidDataException(string message) :
            base(message)
        {
        }
    }
    public class NonFatalPNGException : PNGBaseException
    {
        public NonFatalPNGException()
            : base()
        {
        }
        public NonFatalPNGException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
        public NonFatalPNGException(string message) :
            base(message)
        {
        }
    }
    public class MultipleChunkException : PNGBaseException
    {
        public string ChunkType
        {
            get;
            private set;
        }
        public int Count
        {
            get;
            private set;
        }
        public int ExpectedCount
        {
            get;
            private set;
        }
        public MultipleChunkException(string chunkType, int count, int excepted):base(String.Format("Chunk Type: {0} found {1} time however was expected {2} times", chunkType, count, excepted))
        {
            this.ChunkType = chunkType;
            this.Count = count;
            this.ExpectedCount = excepted;
        }
    }
}
